package hu.test.atacama;

import android.os.Parcel;
import android.os.Parcelable;

public class Car implements Parcelable {

	private String carKey;

	private String carName;

	public String getCarKey() {
		return carKey;
	}

	public void setCarKey(String carKey) {
		this.carKey = carKey;
	}

	public String getCarName() {
		return carName;
	}

	public void setCarName(String carName) {
		this.carName = carName;
	}

	public Car(String carKey, String carName) {
		this.carKey = carKey;
		this.carName = carName;
	}
	
	protected Car(Parcel in) {
		carKey = in.readString();
		carName = in.readString();
	}
	
	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(carKey);
		dest.writeString(carName);
	}

	public static final Parcelable.Creator<Car> CREATOR = new Parcelable.Creator<Car>() {
		public Car createFromParcel(Parcel in) {
			return new Car(in);
		}

		public Car[] newArray(int size) {
			return new Car[size];
		}
	};
	
}